package org.example.factorymethod;

public class ProductFactory {
    IProduct product;
    IProduct create(String way){
        if("A".equals(way)){
            product = new ProductA();
        }else {
            product = new ProductB();
        }
        product.putColor();
        product.putTag();
        return product;
    }
}
